<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/vue.js"></script>
</head>
<body>
<div id="app">
<p>点击次数:{{count}}</p>
    <p>
        <button @click="count++">点击</button>
    </p>
    <p>
        <button @click="print()">print</button>
    </p>
    <p>
        <button @click="say('zhangsan')">say</button>
    </p>
    {{msg1}}=={{msg2}}

</div>
<script>
    let app = new Vue({
        el:"#app",
        data:{
            count:0,
            msg1:'',
            msg2:''
        },
        methods:{
            print:function () {
                this.msg1 = "print事件触发";
            },
            say:function (name) {
                this.msg2 = "hello"+name.charAt(0).toUpperCase()+name.charAt(1).toLowerCase();

            }
        }
    });
</script>
</body>
</html>